using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace OgilvyOne.Utility
{
    /// <summary>
    /// Summary description for Encoder
    /// </summary>
    public class Encoder
    {
        public Encoder()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public static string GB2312ToUTF8(string src)
        {
            string dest = "";
            System.Text.Encoding gb = System.Text.Encoding.GetEncoding("GBK");
            byte[] bytes = gb.GetBytes(src);
            dest = System.Text.Encoding.UTF8.GetString(bytes);

            return dest;
        }
    }
}
